<template>
  <div class="welcome">
    <template>
      <el-table :data="logs" style="width: 100%">
        <el-table-column
          align="center"
          prop="username"
          label="登录账户"
          width="180"
        >
        </el-table-column>
        <el-table-column
          align="center"
          prop="lastLogin.ip"
          label="上次登录ip"
          width="180"
        >
        </el-table-column>
        <el-table-column
          align="center"
          prop="lastLogin.loginTime"
          sortable
          label="上次登录时间"
        >
        </el-table-column>
        <el-table-column align="center" prop="nowLogin.ip" label="本次登录ip">
        </el-table-column>
        <el-table-column
          align="center"
          prop="nowLogin.loginTime"
          label="本次登录时间"
        >
        </el-table-column>
      </el-table>
    </template>
  </div>
</template>
<script>
import * as api from "../../../api/index";
export default {
  created() {
    api.getLoginLogApi().then((res) => {
      console.log(res.data);
      this.logs = res.data.data;
    });
  },
  data() {
    return {
      logs: [],
    };
  },
};
</script>
